/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package menudesktop;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author GoLiATh
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        
        try{
            String sSistemaOperativo = System.getProperty("os.name");
            if((sSistemaOperativo).equals("Windows 7")){
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                
            }
            else if((sSistemaOperativo).equals("Windows 8")){
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                
            }
            else if((sSistemaOperativo).equals("Linux")){
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                
            }
            File folder = new File("C:\\BaseDeDatos");
            folder.mkdirs();
            
            FileWriter productoTxt = new FileWriter( new File("C:\\BaseDeDatos\\productos.txt"), true );
            FileWriter platoTxt = new FileWriter( new File("C:\\BaseDeDatos\\platos.txt"), true );
            FileWriter menuTxt = new FileWriter( new File("C:\\BaseDeDatos\\menus.txt"), true );
            productoTxt.close();
            platoTxt.close();
            menuTxt.close();
            
            Ventana ventana = new Ventana();
            ventana.setVisible(true);
        } 
        catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) 
        {
            
        }
        
    }
}
